<div class="row" >
    <div class="col-md-12">
        <div class="pagebanner">

        </div>
    </div>
    <div class="col-md-12 typediv">
        <div class="typetext">图书分类：</div>
        <ul id="booktype">
            <li>
                <span (click)="findBooksByType()">全部</span>
            </li>
            <li *ngFor="let item of bookType" (click)="findBooksByType(item)">
                <span >{{item.content}}</span>
            </li>
        </ul>
        <div >


        </div >
    </div>

    <div class="col-md-12">
        <div class="row" *ngIf="bookBasic.length>0">
            <div class="col-lg-2 col-md-4 col-sm-6 col-xs-12 bookdiv" *ngFor="let item of bookBasic" >

                <div class="bookcover" [routerLink]="['book-basic', item.id ]">
                    <img *ngIf="item.cover&&item.cover.length>0" src='{{"data:image/png;base64,"+item.cover}}'/>
                    <img *ngIf="!item.cover||item.cover.length==0" src='../../content/images/nocover.png'/>
                </div>
                <div class="booktext" [routerLink]="['book-basic', item.id ]">
                    <div class="bookname">{{(item.bookName)?item.bookName:"你猜"}}</div>
                    <div class="bookauth">{{(item.authodId&&item.authodId.authorName)?item.authodId.authorName:"佚名"}}</div>
                </div>
                <button *jhiHasAnyAuthority="'ROLE_USER'"
                    class="btn btn-info btn-sm booktext" [routerLink]="['shopping-cart']">
                    <span class="fa fa-plus"></span>
                    <span class="d-none d-md-inline" >加入购物车</span>
                </button>
                <button
                        [routerLink]="['book-basic', item.id ]"
                        class="btn btn-info btn-sm booktext">
                    <!--<span class="fa fa-eye"></span>-->
                    <span class="d-none d-md-inline">查看详情>></span>
                </button>
            </div>
        </div>

        <div class="row"  *ngIf="bookBasic==null||bookBasic.length==0">
            <div class="alert alert-danger col-md-6" style="margin:10px auto;" role="alert">
                没有找到图书！
            </div>
        </div>
    </div>
</div>

